import React from 'react';
import {Home} from '../pages/main/home';
import {Navi} from '../pages/main/navi';
import {Project} from '../pages/main/pro';
import { Tree } from "../pages/main/tree";

interface TabConfigItem {
  name: string;
  icon: string;
  component: React.ComponentType<any>;
}

export class TabConfig {
  private static configs: {[key: string]: TabConfigItem} = {
    Home: {
      name: 'Home',
      icon: 'home',
      component: Home,
    },
    Tree: {
      name: '体系',
      icon: 'dashboard-customize',
      component: Tree,
    },
    Navi: {
      name: 'Navi',
      icon: 'navigation',
      component: Navi,
    },
    Pro: {
      name: 'Pro',
      icon: 'pro',
      component: Project,
    },
  };

  public static getConfig(key: string): TabConfigItem | undefined {
    return this.configs[key];
  }
}
